package javacore.Statements;

public class SwitchStatement {

	public static void main(String[] args) {
		int marks = 85;
		char grade;
		String remarks;
		
		if( marks >= 90 ){
			grade='A';
		}else if( marks >= 80 ){
			grade='B';
		}else if( marks >= 70 ){
			grade='C';
		}else if( marks >= 60 ){
			grade='D';
		}else {
			grade='F';
		}
		
		System.out.println("Grade is " + grade);
		
		switch(grade){
		case 'A' :
			remarks = "Excellent";
			break;
		case 'B' :
        case 'C' :
        	remarks ="Well done";
           break;
        case 'D' :
        	remarks ="You passed";
        	break;
        case 'F' :
        	remarks ="Better try again";
           break;
        default :
        	remarks ="Invalid grade";
		}
		
		System.out.println(remarks);
	}

}
